const App = {
  mixins: [Query], //配置文件，路径/utils/mixins.js
  data() {
    return {
      totalMembers: 0,
      page: {
        PageNumber: 1, //页码
        RowAmount: 10,
        Condition:window.btoa(unescape(encodeURIComponent("%%"))),
        ExtensionCondition: window.btoa(unescape(encodeURIComponent(" and monitoring_equipment_detail.Village_Number in (" + getCookie('village') + ")"))),
      },
    };
  },
  mounted() {
    this.gettotalMembers();
  },
  methods: {
    gettotalMembers() {
      $.ajax({
        headers: requestHeaders(),
        url: `${mh}/generalBusiness/generalQueryByTableNameWithOriginal`,
        method: "post",
        data: {
          Data: "monitoring_equipment_detail",
          Condition: `Row_Status='0'`,
        },
        success: (res) => {
          this.totalMembers = res.length;
        },
        complete: (XMLHttpRequest) => {
          requestPretreatment(XMLHttpRequest);
      },
      });
    },
    //树的点击筛选事件
    handleNodeClick(data, node) {
      console.log(node.level);
      console.log(data.Monitoring_Equipment_SerialNumber);
      console.log(node);
      this.page.Condition = window.btoa(unescape(encodeURIComponent("%"+data.Monitoring_Equipment_SerialNumber+"%")));
      this.postgetList(this.page);
    },
  },
};

const { createApp } = Vue;
const app = createApp(App);
//这种方式是引入全部图标，无需单个引入
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
const ElMessage = ElementPlus.ElMessage;
app.use(ElementPlus,{locale: zhCn});
app.mount("#app");
